Re: Query kill

Поиск
Список
Период
Сортировка
От eric soroos
Тема Re: Query kill
Дата
Msg-id 57020238.1185653165@[4.42.179.151]
обсуждение исходный текст
Ответ на Re: Query kill  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
On Fri, 12 Jul 2002 01:01:31 -0400 (EDT) in message <200207120501.g6C51Vo14062@candle.pha.pa.us>, Bruce Momjian
<pgman@candle.pha.pa.us>wrote:
 
> Rudi Starcevic wrote:
> > Hello,
> > 
> > If I write a query that is inefficient or in an eternal loop how
> > do I stop it without restarting the postmaster ?
> > 
> > I can see many postmaster processed appearing in the output of the 'ps' 
> > command.
> > Do I need to stop/kill them all or can I stop just the query I want ?
> 
> Just send a SIGINT to the process. That simulates a ^C, which works too
> from the client like psql.

Is there a way to deny permission for certain users to execute a query that exceeds some expected cost?

For example, I have a query builder from user input that could produce a query that ends up doing something that the
queryplanner thinks will take 8M units of work. Generally, this is an unconstrained join between my biggest tables, a
resultthat is neither fast nor useful.
 

If I could set a threshold of 1M units for the webapp user, I could trap this sort of thing before they cause quality
ofservice issues. 
 

eric




В списке pgsql-sql по дате отправления:

Предыдущее
От: Dmitry Tkach
Дата:
Сообщение: It is a bug in pred_test()! (Was: Please, HELP! Why is the query plan so wrong???)
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Query kill